package cn.edu.neusoft.yuejian_02.service;

import java.util.List;

import cn.edu.neusoft.yuejian_02.bean.EditBean;
import cn.edu.neusoft.yuejian_02.bean.OrderBean;
import cn.edu.neusoft.yuejian_02.bean.UserBean;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by jj on 2017/9/26.
 */

public interface UserService {

    @GET("User/Login/")
    Call<UserBean> userLogin(@Query("username")String username,
                             @Query("password")String passsword);

    @GET("User/RegUser/")
    Call<UserBean> userReg(@Query("username")String username,
                           @Query("password")String passsword,
                           @Query("age")String age,
                           @Query("nickname")String nickname);

    @GET("User/getUserInfo/")
    Call<UserBean> userinfo(@Query("user_id")String userid);



    @Multipart
    @POST("User/updatauserpic")
    Call<ResponseBody> updatepic(@Query("user_id")String userid,
                                       @Part MultipartBody.Part file);

    @GET("User/updateUserInfo")
    Call<EditBean> update(@Query("user_id")String userid,
                          @Query("nickname")String nick,
                          @Query("age")String age,
                          @Query("username")String uname,
                          @Query("tel")String tel);
    @GET("User/getUserOrder/")
    Call<List<OrderBean>> orderlist(@Query("user_id")String uid,
                                    @Query("flag")String flag);
}
